<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<c:set var="reportTitle" value="2小时汇总报表" scope="session"/>

<%@ include file="/common/report_head.jsp" %>
<%@ include file="/condition/sartTime_input.html"%>
<%@ include file="/condition/endTime_input.html"%>
<%@ include file="/condition/ivLine_sumo.html"%>
<%@ include file="/condition/componentCellEfficiency_sumo.html"%>

<%@ include file="/common/report_middle.jsp" %>
<div class="col-md-12" style="height: 820px;">
    <div id="pqGrid"></div>
</div>
<%@include file="/common/report_end.jsp" %>


<script>
    $(document).ready(function () {
        $("title").text("2小时汇总报表");

        $('#query_btn').click(function (){
            initGridAndChart();
            ajax('/jn-report/report/twoHourSummary_report.do' ,loadConditionMapData(), true, ajax_successful);

            function ajax_successful(outTrxObj) {
                if(outTrxObj.gridData.length < 1) { showMessengerDialog("数据查询为空"); return false; }

                //grid表格数据
                var colM =[
                    {halign:"center",align:'center', dataIndx: 'date',     title: '日期',       width: 150, editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'hour',     title: '时间',       width: 100, editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'line_id',  title: '线别',       width: 160, editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'attr_1',   title: '电池效率',   width: 120, editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'count',    title: '组件数量',   width: 120, editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'ctm',      title: 'CTM',        width: 120, editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'pm',       title: '实测功率',   width: 120, editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'voc',      title: 'Voc',        width: 100, editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'isc',      title: 'Isc',        width: 120, editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'ff',       title: 'FF',         width: 120, editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'rs',       title: 'Rs',         width: 120, editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'rsh',      title: 'Rsh',        width: 120, editable: false, sortable: true}
                ];
                _pqUtil.f.setColModel($("#pqGrid"), colM);
                _pqUtil.f.seTitle($("#pqGrid"), "2小时汇总报表-表格");
                _pqUtil.f.isShowTitle($("#pqGrid"), false);
                _pqUtil.f.loadPqGridData($("#pqGrid"), outTrxObj.gridData);
            }
        });

    });
</script>
